/*****
 * 
 * 
 * *******心理咨询师详情(psychologyInfo.html)********
 * 
 * 
 * ******/
/************获取数据对象**********/
var id=GetQueryString('id')
var psyone=JSON.parse(localStorage.getItem('psyorOne'))
if(id!=psyone.id){
    window.history.back()
}else{
    setPsychologyDetailData(psyone)
}
var getpsychologydetaildata={
	title:'获取心理咨询师详情页',
	url:'./json/psychology.json',
	sendData:{"id":id},
}
//新闻渲染数据
function setPsychologyDetailData(data){
	var baseDom='';
	var detailDom='';
	var data=data;
	console.log(data)
	//咨询师基本信息
	baseDom=`
		<p class="zxsPic"><img src="${data.headimg ?data.headimg :'img/t.jpg' }"></p>
		<p class="zxsInfo">
			<span class="zxsN">${data.name}</span>
			<span class="zxsad">所在地：${data.address}</span>
			<span class="zxsgood">电话：${data.tel}</span>
		</p>
	`
	$('.zxsMb').html(baseDom)
	$('.mui-pull-right svg').attr('tel',data.tel)
	//咨询师详细信息
	detailDom=`
		<p>详细介绍：</p>
		<span>${data.des}</span>
	`
	$('.moreInfo').html(detailDom)
}
/************获取数据对象end**********/

/******h5+******/
mui.plusReady(function() {   
//	拨打电话
	mui("header").on('tap','svg',function(){
		var btnArray=['拨打','取消'];
        var phone=$(this).attr('tel');
        mui.confirm('是否拨打'+phone+'?','提示',btnArray,function(e){
            if(e.index == 0){
                plus.device.dial(phone,false);
            }
        });
	})
});
/******h5+****end**/